#include"test.h"
#include<stdio.h>//仅仅用于printf打印

int main()
{
    _FILE* fp = _fopen("test.txt", "w");
    if(fp == NULL){
        return 0;
    }
    int cnt = 10;
    const char* str = "zhang ";//这样数据会被存放在缓冲区的
    while(cnt--){
        _fwrite( str,strlen(str), fp);
        sleep(1);
        printf("cnt:%d\n", cnt);
    }

    _fclose(fp);
    return 0;
}
